﻿<Application xmlns="http://schemas.microsoft.com/client/2007"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="SilverNibbles.App"
             >
    <Application.Resources>        
        <!-- Beta 2 allows us to put SolidColorBrush and Color in here -->
        <SolidColorBrush x:Name="WallBrush" Color="#FF2864A0" />
        <SolidColorBrush x:Name="SammyBrush" Color="Orange" />
        <SolidColorBrush x:Name="JakeBrush" Color="Purple" />        
        
        <Style x:Key="LevelBackground" TargetType="Rectangle">
            <Setter Property="Stroke" Value="{StaticResource WallBrush}" />
            <Setter Property="Fill">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0,1">
                        <GradientStop Color="#FFADD8E6" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <Style 
            xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
            TargetType="Button"
            x:Key="NewGameButtonStyle">
            <Setter Property="FontFamily" Value="teen bold.ttf#Teen" />
            <Setter Property="FontSize" Value="18" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">

                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition To="MouseOver" GeneratedDuration="0:0:0.2" />
                                        <vsm:VisualTransition To="Normal" GeneratedDuration="0:0:0.2" />
                                    </vsm:VisualStateGroup.Transitions>

                                    <vsm:VisualState x:Name="Normal" />
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimation 
                                            Storyboard.TargetName="ButtonBackgroundBrush"
                                            Storyboard.TargetProperty="Color"
                                            To="#C0C0C0"
                                            Duration="0" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>

                            <Border BorderThickness="2" 
                                    CornerRadius="4"
                                    Padding="3"                                    
                                    >
                                <Border.Background>
                                    <SolidColorBrush x:Name="ButtonBackgroundBrush" Color="AliceBlue"/>
                                </Border.Background>
                                <Border.BorderBrush>
                                    <SolidColorBrush x:Name="ButtonBorderBrush" Color="Black"/>
                                </Border.BorderBrush>
                                <ContentPresenter
                                  Content="{TemplateBinding Content}"
                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                    HorizontalAlignment="Center"
                                  Margin="4,2" />
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


    </Application.Resources>
</Application>